package com.jvm.oom;

import java.util.ArrayList;
import java.util.List;
/**
 *
 * 功能描述: 测试OOM的问题
 * -Xms20m -Xmx20m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDetails
 *
 * @param:
 * @return:
 * @auther: csh
 * @date: 2020/12/3 15:01
 */
public class OOME {

    static class OOMObject {
    }

    public static void main(String args[]) {
        List <OOMObject> list = new ArrayList <OOMObject>();
        while (true) {
            list.add(new OOMObject());
        }
    }
}